<script>
import { h } from 'vue'

export default {
  componentName: 'windowContent',
  props: {
    gutter: Number
  },
  data() {
    return {
      cols: []
    }
  },
  created() {},
  mounted() {},
  methods: {
    addCol(node) {
      this.cols.push(node)
    },
    findColIndex(node) {
      let nodeColId = node.colId
      return this.cols.findIndex((n) => n.colId === nodeColId)
    },
    removeCol(node) {
      let nodeIndex = this.findColIndex(node)
      this.cols = this.cols.splice(nodeIndex, 1)
    }
  },
  render() {
    let children = [h(this.$slots.default)]

    return h('div', { class: 'window-content' }, children)
  }
}
</script>

<style lang="scss"></style>
